function passwordDifficultHandler( responseText )
{
    var container = document.getElementById( 'check_password' );
    container.textContent = responseText;
    container.className   = responseText;
    if ( responseText == 'wrong symbols' )
    {
        container.className = 'weak';
    }
}

function passDifficult()
{
    var container = document.getElementById( 'check_password' );
    container.className = 'processing';
    container.textContent = 'processing';
        
    var param = '?pass=' + this.value;
    var xmlHttp = getXmlHttp();
    
    xmlHttp.open( 'GET', '/php/ajax/password_evaluator.php' + param, true );
    xmlHttp.onreadystatechange = function()
    {
        passwordDifficultHandler( xmlHttp.responseText );
    }
    
    xmlHttp.send( null );
}